package com.java110.mall.cart.bmo.housekeepingFeeType.impl;

import com.java110.mall.cart.bmo.housekeepingFeeType.ISaveHousekeepingFeeTypeBMO;
import com.java110.core.annotation.Java110Transactional;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.cart.IHousekeepingFeeTypeInnerServiceSMO;
import com.java110.po.housekeeping.HousekeepingFeeTypePo;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service("saveHousekeepingFeeTypeBMOImpl")
public class SaveHousekeepingFeeTypeBMOImpl implements ISaveHousekeepingFeeTypeBMO {

    @Autowired
    private IHousekeepingFeeTypeInnerServiceSMO housekeepingFeeTypeInnerServiceSMOImpl;

    /**
     * 添加小区信息
     *
     * @param housekeepingFeeTypePo
     * @return 订单服务能够接受的报文
     */
    @Java110Transactional
    public ResponseEntity<String> save(HousekeepingFeeTypePo housekeepingFeeTypePo) {

        housekeepingFeeTypePo.setFeeTypeCd(GenerateCodeFactory.getGeneratorId("11"));
        int flag = housekeepingFeeTypeInnerServiceSMOImpl.saveHousekeepingFeeType(housekeepingFeeTypePo);

        if (flag > 0) {
        return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
        }

        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
    }

}
